package com.cs.dao;

import com.cs.entity.Student;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface StudentDao {
    @Select("select * from student01")
    List<Student> selectAll();
    @Select("select * from student01 where id=#{id}")
    Student SelectId(int id);
    @Delete("Delete from student01 where id = #{id}")
    int deleteId(int id);
    @Update("Update student01 set name = #{name} where id = #{id}")
    int update (Student student);

    @Insert("insert into student01 (name) values (#{name})")
    int Insert(Student student);
}
